Python itertools.groupby gives unexpected results when sorting by binary representation

join shbcf.ru